﻿

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Data;

namespace .BizLogic
{
    using RDIFramework.BizLogic;
    using RDIFramework.Utilities;

    /// <summary>
    /// pmwebsitegroupEntity
    /// pm-站群信息
    /// 
    /// 修改纪录
    /// 
    /// 2025-01-18 版本：3.5  创建主键。
    /// 
    /// 版本：3.5
    /// 
    /// <author>
    /// <name></name>
    /// <date>2025-01-18</date>
    /// </author>
    /// </summary>
    [Serializable]
    public partial class pmwebsitegroupEntity : BaseEntity
    {
        /// <summary>
        /// 站群id
        /// </summary>
        [Key] 
        [ScaffoldColumn(false)] 
        [DataMember] 
        public int? Id { get; set; } 

        /// <summary>
        /// 网群名称
        /// </summary>
        [StringLength(200, ErrorMessage = "网群名称不能超过200个字符")] 
        [Display(Name = "网群名称")] 
        [Required(ErrorMessage = "需要输入网群名称")]
        [DataMember] 
        public string GroupName { get; set; } 

        /// <summary>
        /// 网群简称
        /// </summary>
        [StringLength(200, ErrorMessage = "网群简称不能超过200个字符")] 
        [Display(Name = "网群简称")] 
        [Required(ErrorMessage = "需要输入网群简称")]
        [DataMember] 
        public string GroupShortname { get; set; } 

        /// <summary>
        /// 创建时间
        /// </summary>
        [StringLength(, ErrorMessage = "创建时间不能超过个字符")] 
        [Display(Name = "创建时间")] 
        [Required(ErrorMessage = "需要输入创建时间")]
        [DataMember] 
        public string CreateTime { get; set; } 

        /// <summary>
        /// 修改时间
        /// </summary>
        [StringLength(, ErrorMessage = "修改时间不能超过个字符")] 
        [Display(Name = "修改时间")] 
        [Required(ErrorMessage = "需要输入修改时间")]
        [DataMember] 
        public string UpdateTime { get; set; } 

        /// <summary>
        /// 创建人
        /// </summary>
        [StringLength(64, ErrorMessage = "创建人不能超过64个字符")] 
        [Display(Name = "创建人")] 
        [Required(ErrorMessage = "需要输入创建人")]
        [DataMember] 
        public string CreateBy { get; set; } 

        /// <summary>
        /// 修改人
        /// </summary>
        [StringLength(64, ErrorMessage = "修改人不能超过64个字符")] 
        [Display(Name = "修改人")] 
        [Required(ErrorMessage = "需要输入修改人")]
        [DataMember] 
        public string UpdateBy { get; set; } 

        /// <summary>
        /// 运行状态,0=停用,1=正常
        /// </summary>
        [Display(Name = "运行状态,0=停用,1=正常")] 
        [Required(ErrorMessage = "需要输入运行状态,0=停用,1=正常")]
        [DataMember] 
        public byte? Status { get; set; } 

        /// <summary>
        /// 排序
        /// </summary>
        [Display(Name = "排序")] 
        [Required(ErrorMessage = "需要输入排序")]
        [DataMember] 
        public int? Sortnum { get; set; } 

        /// <summary>
        /// 拼音码
        /// </summary>
        [StringLength(100, ErrorMessage = "拼音码不能超过100个字符")] 
        [Display(Name = "拼音码")] 
        [Required(ErrorMessage = "需要输入拼音码")]
        [DataMember] 
        public string Pinyin { get; set; } 

        /// <summary>
        /// 备注
        /// </summary>
        [StringLength(, ErrorMessage = "备注不能超过个字符")] 
        [Display(Name = "备注")] 
        [Required(ErrorMessage = "需要输入备注")]
        [DataType(DataType.MultilineText)]
        [DataMember] 
        public String Remark { get; set; } 

        /// <summary>
        /// 构造函数
        /// </summary>
        public pmwebsitegroupEntity()
        {
        }


        /// <summary>
        /// 从数据行读取
        /// </summary>
        /// <param name="dataRow">数据行</param>
        protected override BaseEntity GetFrom(IDataRow dataRow)
        {
            this.Id = BusinessLogic.ConvertToNullableInt(dataRow[pmwebsitegroupTable.FieldId]);
            this.GroupName = BusinessLogic.ConvertToString(dataRow[pmwebsitegroupTable.FieldGroupName]);
            this.GroupShortname = BusinessLogic.ConvertToString(dataRow[pmwebsitegroupTable.FieldGroupShortname]);
            this.CreateTime = BusinessLogic.ConvertToString(dataRow[pmwebsitegroupTable.FieldCreateTime]);
            this.UpdateTime = BusinessLogic.ConvertToString(dataRow[pmwebsitegroupTable.FieldUpdateTime]);
            this.CreateBy = BusinessLogic.ConvertToString(dataRow[pmwebsitegroupTable.FieldCreateBy]);
            this.UpdateBy = BusinessLogic.ConvertToString(dataRow[pmwebsitegroupTable.FieldUpdateBy]);
            this.Status = BusinessLogic.ConvertToString(dataRow[pmwebsitegroupTable.FieldStatus]);
            this.Sortnum = BusinessLogic.ConvertToNullableInt(dataRow[pmwebsitegroupTable.FieldSortnum]);
            this.Pinyin = BusinessLogic.ConvertToString(dataRow[pmwebsitegroupTable.FieldPinyin]);
            this.Remark = BusinessLogic.ConvertToString(dataRow[pmwebsitegroupTable.FieldRemark]);
            return this;
        }
    }
}
